package cn.zhuzicc.clientappredis.controller;

import cn.zhuzicc.clientappredis.schedule.TokenTask;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;

/**
 * ClassName: HelloController <br/> Description: <br/> date: 2020/10/11 11:16 <br/>
 *
 * @author zhuzi
 * @since JDK 1.8
 */
@Controller
public class HelloController {

    @Autowired
    TokenTask tokenTask;

    @GetMapping("/index.html")
    public String hello(String code, Model model) {
        model.addAttribute("msg", tokenTask.getData(code));
        return "index";
    }
}
